Ford Algorithm Using Dynamic Programming Technique